﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ContactEdit.ascx.cs" Inherits="MockPrjTeam4.ContactEdit" %>
<%@ Import Namespace="MockPrjTeam4.Entity" %>   
<style type="text/css">
    .styletxt
    {
        Height:26px;
        Width:152px;
    }
    .style1
    {
        width: 131px;
    }
    .style2
    {
        Height: 26px;
        Width: 193px;
    }
    .style3
    {
        width: 159px;
    }
    .style4
    {
        width: 131px;
        height: 31px;
    }
    .style5
    {
        Height: 31px;
        Width: 193px;
    }
    .style6
    {
        width: 159px;
        height: 31px;
    }
    .style7
    {
        height: 31px;
    }
    .styleMessage
    {
        height: 31px;    
    }
</style>
    <div style="margin-left: 50px; margin-top:20px;" >
        <asp:Label ID="lblMessage" runat="Server" ForeColor="red"> </asp:Label>
    </div>
    <div style="height: 462px; padding-left:10px; margin-left: 50px; width: 868px; border: 1px solid black; margin-top:20px;" >
        <table border="0" cellspacing="0" cellpadding="0" 
            style="height: 450px; width: 99%;">
        	<tr>
        		<td class="style1">
                    First Name
                    <asp:Label ID="Label1" runat="Server" Text="*" ForeColor="Red"></asp:Label>
                </td>
                <td class="styletxt">
                    <asp:TextBox ID="txtFirstName" runat="Server" CssClass="styletxt"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="Server" ControlToValidate="txtFirstName"
                    Display="Dynamic">You must enter First Name</asp:RequiredFieldValidator>
                </td>
                <td class="style3">
                    Manager Name
                </td>
                <td class="styletxt">
                    <asp:TextBox ID="txtContactName" runat="Server" ReadOnly="true" BackColor="#CCCCCC" Enabled="true" 
                        ForeColor="#0000CC"  CssClass="styletxt" ClientIDMode="Static"></asp:TextBox>
                    <asp:HiddenField ID="hdfContact" runat="Server" ClientIDMode="Static"/>
                    <asp:LinkButton ID="lkbtnLookup" runat="Server" ForeColor="#0099FF" 
                    OnClientClick="popup('PopupContact.aspx', 620, 450);">Look up</asp:LinkButton>
                </td>
        	</tr>
            <tr>
                <td class="style1">
                    Surname
                    <asp:Label ID="Label2" runat="server" Text="*" ForeColor="Red"></asp:Label>
                </td>
                <td class="style2">
                    <asp:TextBox ID="txtSurname" runat="Server" CssClass="styletxt"></asp:TextBox>
                </td>
                <td class="style3">
                    Contact Type
                    <asp:Label ID="Label3" runat="Server" Text="*" ForeColor="Red"></asp:Label>
                </td>
                <td class="styletxt">
                    <asp:DropDownList ID="ddlContactType" runat="server" CssClass="styletxt"
                        DataTextField="ContactTypeName" AppendDataBoundItems="true"
                        DataValueField="ContactTypeName">
                         <asp:ListItem Selected="True"></asp:ListItem>
                         <asp:ListItem Value="Employee"></asp:ListItem>
                         <asp:ListItem Value="Student"></asp:ListItem>
                         <asp:ListItem Value="Individual"></asp:ListItem>
                        </asp:DropDownList>
                    <br />
                    <asp:RequiredFieldValidator ControlToValidate="ddlContactType"
                    ErrorMessage="You must enter ContactType" runat="Server"
                    ></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    Known As
                </td>
                <td class="style2">
                    <asp:TextBox ID="txtKnownAs" runat="Server" CssClass="styletxt"></asp:TextBox>
                </td>
                <td class="style3">
                    Best Contact Method
                </td>
                <td class="styletxt">
                    <asp:DropDownList ID="ddlBestContactMethod" runat="Server" CssClass="styletxt"
                        DataSourceID="odsBestContactMethod" DataTextField="BestContactMethodName" 
                        DataValueField="BestContactMethodName"></asp:DropDownList>
                    <asp:ObjectDataSource ID="odsBestContactMethod" runat="server" 
                        SelectMethod="ListBestContactMethod" 
                        TypeName="MockPrjTeam4.Biz.BestContactMethodBiz"></asp:ObjectDataSource>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    Office Phone
                </td>
                <td class="style2">
                    <asp:TextBox ID="txtOfficePhone" runat="Server" Height="26px" Width="152px" CssClass="styletxt"></asp:TextBox>
                </td>
                <td class="style3">
                    Job Role
                </td>
                <td class="styletxt">
                    <asp:TextBox ID="txtJobRole" runat="Server" CssClass="styletxt"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    Mobile Phone
                </td>
                <td class="style2">
                    <asp:TextBox ID="txtMobilePhone" runat="Server" Height="26px" Width="150px" CssClass="styletxt"></asp:TextBox>
                </td>
                <td class="style3">
                    Workbase
                </td>
                <td class="styletxt">
                    <asp:TextBox ID="txtWorkbase" runat="Server" CssClass="styletxt"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    ST Home Phone
                </td>
                <td class="style2">
                    <asp:TextBox ID="txtHomePhone" runat="Server" Height="28px" Width="147px" CssClass="styletxt"></asp:TextBox>
                </td>
                <td class="style3">
                    Job Title
                </td>
                <td class="styletxt">
                    <asp:TextBox ID="txtJobTitle" runat="Server" CssClass="styletxt"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    Email Address
                </td>
                <td class="style5">
                    <asp:TextBox ID="txtEmail" runat="Server" Height="27px" Width="144px" CssClass="styletxt"></asp:TextBox>
                </td>
                <td class="style6">
                    Is Active?
                </td>
                <td class="style7">
                    <asp:CheckBox ID="chkIsActive" runat="Server"/>
                </td>
            </tr>
        </table>
        
                    <asp:HiddenField ID="hfContactId" runat="Server"/>
                    
                
        </div>
        <div style="margin-left: 50px; margin-top: 30px">
        <asp:Button ID="btnSave" runat="Server" Text="Save" OnClick="btnSave_Click"/>
        <asp:Button ID="btnBack" runat="Server" Text="Back" OnClick="btnBack_Click"/>
        </div>